package wkt.exam;

import lombok.Data;

import javax.validation.constraints.NotNull;

@Data
public class ExamHomeStatus {
    @NotNull(message = "basicCode必传")
    private String basicCode;
    private boolean attentionRead;

    private long danXuanQuestionCount;
    private long danXuanAnsweredQuestionCount;
    private long danXuanAnsweredWrongQuestionCount;
    private long duoXuanQuestionCount;
    private long duoXuanAnsweredQuestionCount;
    private long duoXuanAnsweredWrongQuestionCount;
    private long tianKongQuestionCount;
    private long tianKongAnsweredQuestionCount;
    private long tianKongAnsweredWrongQuestionCount;
    private long mingCiJieShiQuestionCount;
    private long mingCiJieShiAnsweredQuestionCount;
    private long mingCiJieShiAnsweredWrongQuestionCount;
    private long lunShuQuestionCount;
    private long lunShuAnsweredQuestionCount;
    private long lunShuAnsweredWrongQuestionCount;

    public long getTotalQuestionCount() {
        return getDanXuanQuestionCount() + getDuoXuanQuestionCount() + getTianKongQuestionCount() + getMingCiJieShiQuestionCount() + getLunShuQuestionCount();
    }

    public long getTotalAnsweredQuestionCount() {
        return getDanXuanAnsweredQuestionCount() + getDuoXuanAnsweredQuestionCount() + getTianKongAnsweredQuestionCount() + getMingCiJieShiAnsweredQuestionCount() + getLunShuAnsweredQuestionCount();
    }

    public long getTotalAnsweredWrongQuestionCount() {
        return getDanXuanAnsweredWrongQuestionCount() + getDuoXuanAnsweredWrongQuestionCount() + getTianKongAnsweredWrongQuestionCount() + getMingCiJieShiAnsweredWrongQuestionCount() + getLunShuAnsweredWrongQuestionCount();
    }
}
